package com.yx.modules.api.service.impl;


import com.yx.modules.api.dao.TbAttentionDao;
import com.yx.modules.api.entity.TbAttention;
import com.yx.modules.api.service.TbAttentionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;



@Service
public class TbAttentionServiceImpl implements TbAttentionService {
	@Autowired
	private TbAttentionDao attentionDao;
	
	@Override
	public TbAttention queryObject(Integer id){
		return attentionDao.queryObject(id);
	}
	
	@Override
	public List<TbAttention> queryList(Map<String, Object> map){
		return attentionDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return attentionDao.queryTotal(map);
	}
	
	@Override
	public void save(TbAttention attention){
		attentionDao.save(attention);
	}
	
	@Override
	public void update(TbAttention attention){
		attentionDao.update(attention);
	}
	
	@Override
	public void delete(Integer id){
		attentionDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		for (int i=0;i<ids.length;i++){
			attentionDao.delete(ids[i]);
		}
	}

	@Override
	public TbAttention findByUserAndAuthor(String uuid, String uuid1) {
		return attentionDao.findByUserAndAuthor(uuid,uuid1);
	}

	@Override
	public Integer findTotalByUseruuid(String uuid) {
		return attentionDao.findTotalByUseruuid(uuid);
	}

}
